home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / Pedestal / Source / Sources / Panes / PedControl.cc next >
Encoding:
C/C++ Source or Header  |  2000-06-24  |  1.6 KB  |  133 lines

  1. /*    =============
  2.  *    PedControl.cc
  3.  *    =============
  4.  */
  5.  
  6. #include "PedestalDebugging.h"
  7.  
  8. #include <Fonts.h>
  9. #include <Windows.h>
  10.  
  11. #include "PedControl.hh"
  12.  
  13. #include "Ped1AppProcess.hh"
  14. #include "PedApplication.hh"
  15. #include "PedView.hh"
  16.  
  17. PedControl::PedControl(PedView &inSuperView)
  18. : PedPane(inSuperView), macControl(NULL)
  19. {
  20. }
  21.  
  22. PedControl::~PedControl()
  23. {
  24. }
  25.  
  26. void
  27. PedControl::Init()
  28. {
  29. }
  30.  
  31. void
  32. PedControl::Open()
  33. {
  34.     Rect textRect;
  35.     
  36.     PedPane::Open();
  37.     
  38. }
  39.  
  40. void
  41. PedControl::Close()
  42. {
  43.     
  44.     PedPane::Close();
  45. }
  46.  
  47.  
  48. short
  49. PedControl::Minimum()
  50. {
  51.     return macControl ? ::GetControlMinimum(macControl) : 0;
  52. }
  53.  
  54. void
  55. PedControl::SetMinimum(short inMin)
  56. {
  57.     if (macControl) {
  58.         ::SetControlMinimum(macControl, inMin);
  59.     }
  60. }
  61.  
  62. short
  63. PedControl::Maximum()
  64. {
  65.     return macControl ? ::GetControlMaximum(macControl) : 0;
  66. }
  67.  
  68. void
  69. PedControl::SetMaximum(short inMax)
  70. {
  71.     if (macControl) {
  72.         ::SetControlMaximum(macControl, inMax);
  73.     }
  74. }
  75.  
  76. short
  77. PedControl::Value()
  78. {
  79.     return macControl ? ::GetControlValue(macControl) : 0;
  80. }
  81.  
  82. void
  83. PedControl::SetValue(short inVal)
  84. {
  85.     if (macControl) {
  86.         ::SetControlValue(macControl, inVal);
  87.     }
  88. }
  89.  
  90.  
  91. void
  92. PedControl::Activate()
  93. {
  94.     if (macControl) {
  95.         //::ShowControl(macControl);
  96.     }
  97. }
  98.  
  99. void
  100. PedControl::Deactivate()
  101. {
  102.     if (macControl) {
  103.         //::HideControl(macControl);
  104.     }
  105. }
  106.  
  107. void
  108. PedControl::Resize(short inWidth, short inHeight)
  109. {
  110.     PedPane::Resize(inWidth, inHeight);
  111.     
  112. }
  113.  
  114. void
  115. PedControl::Draw()
  116. {
  117.     ::EraseRect(&qd.thePort->portRect);
  118. }
  119.  
  120.  
  121. void
  122. PedControl::DispatchNullEvent(EventRecord &inEvent)
  123. {
  124. }
  125.  
  126. void
  127. PedControl::DispatchClickEvent(EventRecord &inEvent)
  128. {
  129.     
  130.     //::SetPort(macWindow);
  131.     ::GlobalToLocal(&inEvent.where);
  132. }
  133.